<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        p {
            display: flex;
        }

        span {
            width: 100px;
            text-align: center;
            border: 1px solid #000;
            margin-right: 10px;
            flex-shrink: 0;
        }
    </style>
</head>

<body>

    <!-- <p>
        <span>1 * 1 = 1</span>
    </p>

    <p>
        <span>1 * 1 = 1</span>
        <span>1 * 1 = 1</span>
    </p> -->

    <script>
        // 9行p
        function print99(n) {
            for (var i = 1; i <= n; i++) {
                document.write('<p>');
                for (var j = 1; j <= i; j++) {
                    document.write('<span>' + j + 'x' + i + '=' + i * j + '</span>');
                }
                document.write('</p>');
            }
        }

        print99(12);

    </script>

</body>

</html>